package com.neuedu.corejava.ch10test;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Test {


		public static void main(String[] args) {
			List list = new ArrayList();
			list.add("apple");
			list.add("grape");
			list.add("banana");
			list.add("pear");
			
			System.out.println("最大的元素为"+Collections.max(list));
			System.out.println("最小的元素为"+Collections.min(list));
			Collections.sort(list);
			for(int i=0;i<1;i++) {
				System.out.println(list);
			}
			
		}

}
